package com.epsi.mightymaps.act;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;
import android.widget.TabHost.TabSpec;

public class OngletsManager extends TabActivity implements OnTabChangeListener {
	private static final String TAB_MAP = "map";
	private static final String TAB_LIST = "list";
	private static final String TAB_CREER = "creer";
	private static final String TAB_PARTAGE = "partager";
	private static TabHost tabHost;
	public static final String PARCOURS = "com.epsi.mightymaps.PARCOURS";

	@Override
	protected void onCreate(final Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		Resources res = getResources();
		Intent intent = getIntent();

		tabHost = getTabHost();
		tabHost.setOnTabChangedListener(this);

		TabSpec tablist = tabHost.newTabSpec(TAB_LIST);
		tablist.setIndicator("parcours");
		tablist.setContent(new Intent(this, ListeParcours.class));
		tabHost.addTab(tablist);

		TabSpec tabMap = tabHost.newTabSpec(TAB_MAP);
		tabMap.setIndicator("map");
		tabMap.setContent(new Intent(this, Map.class));
		tabHost.addTab(tabMap);

		TabSpec tabadd = tabHost.newTabSpec(TAB_CREER);
		tabadd.setIndicator("creer");
		tabadd.setContent(new Intent(this, ListeParcours.class));
		tabHost.addTab(tabadd);

		TabSpec tabSend = tabHost.newTabSpec(TAB_PARTAGE);
		tabSend.setIndicator("partager");
		tabSend.setContent(new Intent(this, SendCourseActivity.class));
		tabHost.addTab(tabSend);

	}

	public void onTabChanged(String tabId) {
		// TODO Auto-generated method stub

	}
}
